﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace webQQservice
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (Global.login == false)
            {
                Button1.Enabled = false;
                Button1.Text = "QQ未登录";
                return;
            }
            if (TextBox1.Text == "" || TextBox2.Text == "")
            {
                Response.Write("请填入QQ和内容。");
                return;
            }
            if (QQHelp.SendMsg(Global.item.Cookie, Global.friendList[TextBox1.Text.Trim()], TextBox2.Text.Trim(), Global.item.ClientId, Global.item.Psessionid))
            {
                Response.Write("发送成功");
            }
            else
            {
                 Response.Write( "发送失败，可能QQ号码不对,或未添加 1583968338 好友。");
            }

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            if (Global.login == false)
            {
                Button2.Enabled = false;
                Button2.Text = "QQ未登录";
                return;
            }
            if (TextBox1.Text == "" || TextBox2.Text == "")
            {
                Response.Write("请填入QQ和内容。");
               
                return;
            }
            Response.Write("POST参数串：  http://" + Request.Url.Host + "/m.aspx?qqnum=" + TextBox1.Text.Trim() + "&mes=" + TextBox2.Text.Trim() + "&parmars=测试");
        }
    }
}